package com.zhiwang.planet.di.component

import com.zhiwang.planet.di.ActivityScope
import com.zhiwang.planet.di.module.AccountModule
import com.zhiwang.planet.di.module.AutoDisposeModule
import com.zhiwang.planet.di.module.BindsModule
import com.zhiwang.planet.ui.LoginActivity
import com.zhiwang.planet.ui.my.AccountSettingActivity
import dagger.BindsInstance
import dagger.Component

@ActivityScope
@Component(modules = [AccountModule::class, BindsModule::class, AutoDisposeModule::class], dependencies = [AppComponent::class])
interface LoginComponent {

    fun inject(activity: LoginActivity)
    fun inject(activity: AccountSettingActivity)


    @Component.Builder
    interface Builder {

        @BindsInstance
        fun name(name: String): Builder

        fun accountModule(accountModule: AccountModule): Builder

        fun autoDisposeModule(autoDisposeModule: AutoDisposeModule): Builder

        fun appComponent(app: AppComponent): Builder

        fun build(): LoginComponent
    }
}